import React from "react";
import Form from "./Form";
import List from "./List";

import { useEffect } from "react";
import { useDispatch } from "react-redux";

const App = () => {
  const dispatch = useDispatch();

  useEffect(() => {
    dispatch({ type: "loadAction" });
    // eslint-disable-next-line
  }, []);

  return (
    <>
      <h2>redux-saga-todolist</h2>
      <Form />
      <List />
    </>
  );
};

export default App;
